<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<f:view>

	<h:head>
		<title>#{projetoBean.projetoValores.projeto.nome}</title>
		<h:outputStylesheet name="main.css" library="css" />
		<h:outputScript library="js" name="main.js" />
		<meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8" />
		<!-- PRIMEFACES BUG - Includes utilizadas pelo barChart e não chamadas pelo Primefaces automaticamente -->
		<link type="text/css" rel="stylesheet" href="/projetos/faces/javax.faces.resource/primefaces.css?ln=primefaces&amp;v=4.0" />
		<script type="text/javascript" src="/projetos/faces/javax.faces.resource/jquery/jquery-plugins.js?ln=primefaces&amp;v=4.0"></script>
	</h:head>

	<h:body>

		<h:form id="formulario">

			<div id="head">
				Projeto: #{projetoBean.projetoValores.projeto.nome}

				<p:commandButton styleClass="filtro" value="Voltar"
					icon="ui-icon-arrowreturnthick-1-w"
					action="carteira.xhtml?faces-redirect=true" update=":formulario" />

			</div>

			<div id="main_content">

				<p:barChart id="analiseLucro" extender="extFillToZero"
					value="#{projetoBean.analiseLucro.analiseLucroChart}"
					title="Análise do Lucro - R$" min="#{projetoBean.analiseLucro.min}"
					max="#{projetoBean.analiseLucro.max}"
					datatipFormat="#{carteiraBean.getDatatipFormat()}"
					style="width:400px; margin-left: 20px; float:left; margin-top:35px;" animate="true" />

				<p:barChart id="analiseQtdeHoras" showDataLabels="true"
					value="#{projetoBean.analiseQtdeHoras.analiseQtdeHorasChart}"
					title="Análise de Qtde. de Horas" min="0"
					max="#{projetoBean.analiseQtdeHoras.max}"
					datatipFormat="#{carteiraBean.getDatatipFormat()}"
					style="width:430px; margin-left: 80px; float:left; margin-top:35px;" animate="true" />
					
				
				<table border="1" style="float:left; margin-top:65px; margin-left:35px; width:auto;">
					<tr>
						<td>
							<h:outputText value="IDC" styleClass="txtTitle" />
						</td>

						<td class="txtValue">
							<img src="#{projetoBean.imgIdc}" class="dynamicImg" />
							<h:outputText value="#{projetoBean.projetoValores.idc}" >
								<f:convertNumber currencyCode="BRL" />
							</h:outputText>
						</td>
					</tr>
					
					<tr>
						<td>
							<h:outputText value="IDP" styleClass="txtTitle" />
						</td>

						<td class="txtValue">
							<img src="#{projetoBean.imgIdp}" class="dynamicImg" />
							<h:outputText value="#{projetoBean.projetoValores.idp}" >
								<f:convertNumber currencyCode="BRL" />
							</h:outputText>
						</td>
					</tr>
					
					<tr>
						<td>
							<h:outputText value="%" styleClass="txtTitle" />
						</td>

						<td class="txtValue">
							<h:outputText value="#{projetoBean.projetoValores.porcentagem}" >
								<f:convertNumber currencyCode="BRL" />
							</h:outputText>
						</td>
					</tr>
					
					<tr>
						<td>
							<h:outputText value="Fat. Real." styleClass="txtTitle" />
						</td>

						<td class="txtValue">
							R$ 
							<h:outputText value="#{projetoBean.projetoValores.fatRealizado}">
								<f:convertNumber currencyCode="BRL" />
							</h:outputText>
						</td>
					</tr>
					
					<tr>
						<td>
							<h:outputText value="Fat. Prev." styleClass="txtTitle" />
						</td>

						<td class="txtValue">
							R$ 
							<h:outputText value="#{projetoBean.projetoValores.fatPrevisto}" >
								<f:convertNumber currencyCode="BRL" />
							</h:outputText>
						</td>
					</tr>
					
					<tr>
						<td>
							<h:outputText value="Dt. Término" styleClass="txtTitle" />
						</td>

						<td class="txtValue">
							<h:outputText value="#{projetoBean.projetoValores.projeto.dtFim.time}" >
								<f:convertDateTime type="both" pattern="dd/MM/yyyy" dateStyle="long" />
							</h:outputText>
						</td>
					</tr>

				</table>
				
				
				<p:separator style="width: 99.89%; float:left;" />

				<p:panelGrid style="float:left; margin-left:65px; width:335px;">
					<f:facet name="header">
						<p:row>
							<p:column>Término</p:column>
							<p:column>Planejado</p:column>
							<p:column>Venda</p:column>
						</p:row>
					</f:facet>

					<p:row>
						<p:column>
							<h:outputText value="#{projetoBean.analiseLucro.projetoValores.lucroTermino}" >
								<f:convertNumber currencyCode="BRL" />
							</h:outputText>
						</p:column>

						<p:column>
							<h:outputText value="#{projetoBean.analiseLucro.projetoValores.lucroOrc}" >
								<f:convertNumber currencyCode="BRL" />
							</h:outputText>
						</p:column>
						
						<p:column>
							<h:outputText value="#{projetoBean.analiseLucro.projetoValores.lucroVenda}" >
								<f:convertNumber currencyCode="BRL" />
							</h:outputText>
						</p:column>
					</p:row>
				</p:panelGrid>
				
				
				<p:panelGrid style="float:left; margin-left:160px; width:335px;">
					<f:facet name="header">
						<p:row>
							<p:column>VEN</p:column>
							<p:column>ENT</p:column>
							<p:column>VA</p:column>
							<p:column>CR</p:column>
						</p:row>
					</f:facet>

					<p:row>
						<p:column >
							<h:outputText value="#{projetoBean.analiseQtdeHoras.projetoValores.hrVend}" >
								<f:convertNumber currencyCode="BRL" />
							</h:outputText>
						</p:column>

						<p:column >
							<h:outputText value="#{projetoBean.analiseQtdeHoras.projetoValores.ent}" >
								<f:convertNumber currencyCode="BRL" />
							</h:outputText>
						</p:column>
						
						<p:column >
							<h:outputText value="#{projetoBean.analiseQtdeHoras.projetoValores.va}" >
								<f:convertNumber currencyCode="BRL" />
							</h:outputText>
						</p:column>
						
						<p:column >
							<h:outputText value="#{projetoBean.analiseQtdeHoras.projetoValores.cr}" >
								<f:convertNumber currencyCode="BRL" />
							</h:outputText>
						</p:column>
					</p:row>

				</p:panelGrid>

				<p:separator style="width: 99.89%; float:left;" />
				
				<p:lineChart id="evolucaoLucroPrevisto" 
					legendPosition="ne" xaxisAngle="70" datatipFormat="#{carteiraBean.getDatatipFormat()}"
					value="#{projetoBean.evolucaoLucroPrevisto.evolucaoLucroPrevistoChart}"
					zoom="true" animate="true" seriesColors="ffec1e, 480070, ff0e00"
					title="Evolução do Lucro Previsto" showMarkers="false"
					minY="#{projetoBean.evolucaoLucroPrevisto.min}"
					maxY="#{projetoBean.evolucaoLucroPrevisto.max}"
					style="width:1230px; margin-left: 20px; float:left; height:600px;" />
				
				
				<p:separator style="width: 99.89%; float:left; margin:30px 0 30px 0" />
				
					
				<p:lineChart id="evolucaoHoras" 
					legendPosition="ne" xaxisAngle="70"
					datatipFormat="#{carteiraBean.getDatatipFormat()}"
					value="#{projetoBean.evolucaoHoras.evolucaoHorasChart}"
					zoom="true" animate="true" seriesColors="ffec1e, ff0e00, 03b700, 6f00ad "
					title="Evolução das Horas" showMarkers="false"
					minY="#{projetoBean.evolucaoHoras.min}"
					maxY="#{projetoBean.evolucaoHoras.max}"
					style="width:1230px; margin-left: 20px; float:left; height:600px;" />
				
				<p:separator style="width: 99.89%; float:left; margin:30px 0 30px 0" />
				
			</div>

		</h:form>
	</h:body>

</f:view>

</html>